package com.dt76.smallloanbackendservice.controller.huxaun;

import com.dt76.smallloanbackendservice.pojo.huxuan.Information;
import com.dt76.smallloanbackendservice.service.huxuan.InformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/mation")
public class InformationController {
    @Autowired//注入服务层
    private InformationService informationService;

    @RequestMapping("/update")
    public void update(@RequestBody Information information){
        System.out.println("成功调用远程服务:userservice>add>>>");
        informationService.updInformation(information);
    }

    @RequestMapping("/agreement")
    public String qryAgreement(){
        System.out.println("成功调用远程服务:userservice>agreement>>>");
       String agreement = informationService.qryAgreement();
        System.out.println("此数据为："+agreement);
        return agreement;
    }




}
